#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <math.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/fb.h>
#include <fcntl.h>
#include <dlfcn.h>
#include "screen.h"
#include "keyboard.h"
#include "box.h"
#include "plugin.h"
#include "codeports.h"

int
main(int argc, char **argv)
{
	int x, y;
	SCR_Init();
	KEY_Init();
	while(!KEY_Update())
	{
		static int f = 0;
		SCR_Clear();
		for(y = 0; y < cp.video.mode.swap->height; y++)
		{
			for(x = 0; x < cp.video.mode.swap->width; x++)
			{
					SCR_SetPixelRGB(x, y, x * 255 / cp.video.mode.swap->width, f % 255, x * 255 / cp.video.mode.swap->width);
			}
		}
		f++;
		SCR_Swap();
	}
	KEY_Final();
	SCR_Final();
	return EXIT_SUCCESS;
}
